﻿
using ZYLFramework.Manage;
using ZYLFramework.UI;

namespace Game.UI
{
    public class RoundPanelCtrl:UICtrl
    {
        public RoundPanelView View;
        public RoundPanelModel Model;

        public override void Init()
        {
            View = BaseView as RoundPanelView;
            Model = BaseModel as RoundPanelModel;
            SceneVariants.RegisterMessageEvent(EventEnum.SetRoundText, SetRoundText);
        }

        public override void Show(object[] objects)
        {
            base.Show(objects);
            View.Text.text = "";
        }

        /// <summary>
        /// 设置回合面板的文字
        /// </summary>
        /// <param name="objects"></param>
        void SetRoundText(object[] objects)
        {
            var go = (string)objects[0];
            View.Text.text = go;
        }
    }
}
